﻿Shader "Custom/RayMarch"
{
    Properties
    {
        _MainTex ("Texture", 2D) = "white" {}
    }


    SubShader
    {
        Tags { "RenderType"="Opaque" }
        LOD 100
        pass 
        {
            Tags {"LightMode" = "ForwardBase"}
            CGPROGRAM

            #include "UnityCG.cginc"
            #pragma vertex vert
            #pragma fragment frag
            
            struct a2v {
                float4 vertex : POSITION;
                float4 normal : NORMAL;
            };

            struct v2f{
                float4 pos : SV_POSITION;
                float3 normal : TEXCOORD0;
            };

            v2f vert(a2v v)
            {
                v2f o;
                o.pos = UnityObjectToClipPos(v.vertex);
                o.normal = UnityObjectToWorldNormal(v.normal).xyz;
                return o;
            }

            fixed4 frag(v2f i) : SV_Target
            {
                return fixed4(0, 1.0, 0, 1.0);
            }

            ENDCG
        }
    }
}
